package com.acme.bankapp.domain.exception;

import com.acme.bankapp.domain.bank.*;

@SuppressWarnings("serial")
public class OverDraftLimitExceededException extends NotEnoughFundsException {
	private Account account;
	private double maximumAmountToWithdraw;
	
	/**
	 * @param account the account
	 */
	public OverDraftLimitExceededException(Account account) {
		this.account = account;
		this.maximumAmountToWithdraw = account.maximumAmountToWithdraw();
	}

	/**
	 * @return the account
	 */
	public Account getAccount() {
		return account;
	}

	/**
	 * @return the maximum amount to withdraw
	 */
	public double getMaximumAmountToWithdraw() {
		return maximumAmountToWithdraw;
	}
}
